<?php

namespace Yj\Tool;

use Hyperf\Di\Annotation\Inject;
use \Hyperf\Guzzle\ClientFactory;
class Guzzle
{
    /**
     * @Inject()
     * @var ClientFactory
     */
    protected $clientFactory;

    public function getClient()
    {
        return $this->clientFactory->create();
    }

    public function post($uri, array $options = []){
        return $this->getClient()->post($uri,  $options)->getBody()->getContents();
    }
    public static function init(){
        return new static();
    }


}